;(function () {
	/*IE8下未开启调试，console出现错误提示兼容*/
	window.console = window.console || {};
	window.console.log = window.console.log || function () {
		};
	var getCookie = function (name) {
		var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
		if (arr != null) {
			return unescape(arr[2]);
		}
		return null;
	};
	/* Local variable */
	var host = "//" + location.host;
	var debug = /*getCookie("debugFlag") ? true : false*/true;

	var config = {
		//模块系统的基础路径
		base: '/res/',
		vars: {
			//"path":"/static/finance/js/",
			"framework": "js/framework",
			"app": "js/mpe",
		},
		//别名
		alias: {
			"jqueryflot" : "{framework}/jquery.flot.min.js",
			"bootstrap": "{framework}/bootstrap/bootstrap.min.js",
			"icheck": "{framework}/icheck/icheck.min.js",
			"jdialog": "{framework}/jdialog/JDialog.js",
            "nestable": "{framework}/nestable/nestable.js",
			"select2": "{framework}/select2/select2.min.js",
			"switch": "{framework}/switch/bootstrap-switch.min.js",
			"ajaxproxy": "{framework}/AjaxProxy.js",
			"jtemplate": "{framework}/template.js",
			"template": "{framework}/artTemplate.js",
			"jform": "{framework}/JForm.js",
			"datetimepicker": "{framework}/datetimepicker/js/bootstrap-datetimepicker.min.js",
			"editor": "{framework}/kindeditor/kindeditor.js",
			"jupload": "{framework}/jupload/JUpload.js",
			"area" : "{framework}/areaSelect/area.min.js",
			"areaselect" : "{framework}/area/JAreaSelect.js",
			"jpreview" : "{framework}/jpreview.js",
			"layer" : "{framework}/layer/layer.js",
			"JTemplate": "{framework}/JTemplate.js",
			"ztree": "{framework}/ztree/jquery.ztree.core.js",
			"ztree-excheck": "{framework}/ztree/jquery.ztree.excheck.js",
			"ztree-exedit": "{framework}/ztree/jquery.ztree.exedit.js",


			"jquery-validate" : "{framework}/validate/jquery.validate.min.js",
			"validate":"{framework}/validate/validate.js",
			"v-addmethod":"{framework}/validate/addMethod.js",
			"ZeroClipboard":"{framework}/zeroClipboard/ZeroClipboard-min.js",

			"common": "{app}/admin/common.js",
			"login": "{app}/admin/login.js",
			"user": "{app}/admin/user.js",
			"manager": "{app}/admin/manager.js",
			"role": "{app}/admin/role.js",
			"menu": "{app}/admin/menu.js",
			"productType": "{app}/admin/productType.js",
			"account": "{app}/admin/account.js",
			"fund": "{app}/admin/fund.js",
			/**--tmpl-jsconfigitem--**/
			"adjustform" : "{app}/admin/adjustform.js",
			"imagefit":"{app}/common/jquery.imagefit.js",

			"admin/operation_logadd":"{app}/admin/operation_logadd.js",


			"admin/operation_logindex":"{app}/admin/operation_logindex.js",


			"admin/message_remind_sms_tmpladd":"{app}/admin/message_remind_sms_tmpladd.js",


			"admin/message_remind_sms_tmplindex":"{app}/admin/message_remind_sms_tmplindex.js",

			"admin/admin_navadd":"{app}/admin/admin_navadd.js",

			"admin/admin_navindex":"{app}/admin/admin_navindex.js",

			"admin/setting_friendlinkadd":"{app}/admin/setting_friendlinkadd.js",


			"admin/brand_add":"{app}/admin/brand_add.js",
			"admin/brand_index":"{app}/admin/brand_index.js",


			"admin/setting_friendlinkindex":"{app}/admin/setting_friendlinkindex.js",
			"admin/setting_friendlink_cateadd":"{app}/admin/setting_friendlink_cateadd.js",


			"admin/setting_friendlink_cateindex":"{app}/admin/setting_friendlink_cateindex.js",

			"admin/security_index" : "{app}/admin/security_index.js",

			"admin/trading_saleadd":"{app}/admin/trading_saleadd.js",


			"admin/trading_saleindex":"{app}/admin/trading_saleindex.js",


			"admin/trading_invoiceadd":"{app}/admin/trading_invoiceadd.js",


			"admin/trading_invoiceindex":"{app}/admin/trading_invoiceindex.js",


			"admin/trading_contractadd":"{app}/admin/trading_contractadd.js",


			"admin/trading_contractindex":"{app}/admin/trading_contractindex.js",


			"admin/trading_orderadd":"{app}/admin/trading_orderadd.js",


			"admin/trading_orderindex":"{app}/admin/trading_orderindex.js",


			"admin/productadd":"{app}/admin/productadd.js",


			"admin/productindex":"{app}/admin/productindex.js",

			"admin/repertoryadd":"{app}/admin/repertoryadd.js",


			"admin/repertoryindex":"{app}/admin/repertoryindex.js",

			"admin/messageadd":"{app}/admin/messageadd.js",


			"admin/messageindex":"{app}/admin/messageindex.js",


			"admin/message_remind_smsadd":"{app}/admin/message_remind_smsadd.js",


			"admin/message_remind_smsindex":"{app}/admin/message_remind_smsindex.js",


			"admin/message_remindadd":"{app}/admin/message_remindadd.js",


			"admin/message_remindindex":"{app}/admin/message_remindindex.js",


			"admin/member_receipt_addressadd":"{app}/admin/member_receipt_addressadd.js",


			"admin/member_receipt_addressindex":"{app}/admin/member_receipt_addressindex.js",


			"admin/member_groupadd":"{app}/admin/member_groupadd.js",


			"admin/member_groupindex":"{app}/admin/member_groupindex.js",


			"admin/memberadd":"{app}/admin/memberadd.js",


			"admin/memberindex":"{app}/admin/memberindex.js",


			"admin/information_ad_placeadd":"{app}/admin/information_ad_placeadd.js",


			"admin/information_ad_placeindex":"{app}/admin/information_ad_placeindex.js",


			"admin/information_ad_cateadd":"{app}/admin/information_ad_cateadd.js",


			"admin/information_ad_cateindex":"{app}/admin/information_ad_cateindex.js",


			"admin/information_adadd":"{app}/admin/information_adadd.js",


			"admin/information_adindex":"{app}/admin/information_adindex.js",


			"admin/information_singlepage_cateadd":"{app}/admin/information_singlepage_cateadd.js",


			"admin/information_singlepage_cateindex":"{app}/admin/information_singlepage_cateindex.js",


			"admin/information_singlepageadd":"{app}/admin/information_singlepageadd.js",


			"admin/information_singlepageindex":"{app}/admin/information_singlepageindex.js",


			"admin/information_notice_cateadd":"{app}/admin/information_notice_cateadd.js",


			"admin/information_notice_cateindex":"{app}/admin/information_notice_cateindex.js",


			"admin/information_noticeadd":"{app}/admin/information_noticeadd.js",


			"admin/information_noticeindex":"{app}/admin/information_noticeindex.js",


			"admin/information_cateadd":"{app}/admin/information_cateadd.js",


			"admin/information_cateindex":"{app}/admin/information_cateindex.js",


			"admin/informationadd":"{app}/admin/informationadd.js",


			"admin/informationindex":"{app}/admin/informationindex.js",


			"admin/admin_settingadd":"{app}/admin/admin_settingadd.js",


			"admin/admin_settingindex":"{app}/admin/admin_settingindex.js",


			"admin/admin_role_nodeadd":"{app}/admin/admin_role_nodeadd.js",


			"admin/admin_role_nodeindex":"{app}/admin/admin_role_nodeindex.js",


			"admin/admin_manager_roleadd":"{app}/admin/admin_manager_roleadd.js",


			"admin/admin_manager_roleindex":"{app}/admin/admin_manager_roleindex.js",


			"admin/admin_nodeadd":"{app}/admin/admin_nodeadd.js",


			"admin/admin_nodeindex":"{app}/admin/admin_nodeindex.js",


			"admin/admin_roleadd":"{app}/admin/admin_roleadd.js",


			"admin/admin_roleindex":"{app}/admin/admin_roleindex.js",


			"admin/admin_manageradd":"{app}/admin/admin_manageradd.js",


			"admin/admin_managerindex":"{app}/admin/admin_managerindex.js",


			"admin/bank_codeadd":"{app}/admin/bank_codeadd.js",


			"admin/bank_codeindex":"{app}/admin/bank_codeindex.js",


			"admin/bankadd":"{app}/admin/bankadd.js",


			"admin/bankindex":"{app}/admin/bankindex.js",


			"admin/areaadd":"{app}/admin/areaadd.js",


			"admin/areaindex":"{app}/admin/areaindex.js",


			"admin/admin_login_logadd":"{app}/admin/admin_login_logadd.js",


			"admin/admin_login_logindex":"{app}/admin/admin_login_logindex.js",


			"admin/system_opt_logadd":"{app}/admin/system_opt_logadd.js",


			"admin/system_opt_logindex":"{app}/admin/system_opt_logindex.js",


			"admin/gradeadd":"{app}/admin/gradeadd.js",


			"admin/gradeindex":"{app}/admin/gradeindex.js",


			"admin/factoryadd":"{app}/admin/factoryadd.js",


			"admin/factoryindex":"{app}/admin/factoryindex.js",


			"admin/brandadd":"{app}/admin/brandadd.js",


			"admin/brandindex":"{app}/admin/brandindex.js",


			"admin/manager_menuadd":"{app}/admin/manager_menuadd.js",


			"admin/manager_menuindex":"{app}/admin/manager_menuindex.js",


			"admin/manager_roleadd":"{app}/admin/manager_roleadd.js",


			"admin/manager_roleindex":"{app}/admin/manager_roleindex.js",


			"admin/manageradd":"{app}/admin/manageradd.js",


			"admin/managerindex":"{app}/admin/managerindex.js",


			"admin/app_install_logadd":"{app}/admin/app_install_logadd.js",


			"admin/app_install_logindex":"{app}/admin/app_install_logindex.js",


			"admin/appadd":"{app}/admin/appadd.js",


			"admin/appindex":"{app}/admin/appindex.js",


			"admin/user_logadd":"{app}/admin/user_logadd.js",


			"admin/user_logindex":"{app}/admin/user_logindex.js",


			"admin/bank_sign_logadd":"{app}/admin/bank_sign_logadd.js",


			"admin/bank_sign_logindex":"{app}/admin/bank_sign_logindex.js",


			"admin/companyadd":"{app}/admin/companyadd.js",


			"admin/companyindex":"{app}/admin/companyindex.js",


			"admin/user_infoadd":"{app}/admin/user_infoadd.js",


			"admin/user_infoindex":"{app}/admin/user_infoindex.js",


			"admin/useradd":"{app}/admin/useradd.js",


			"admin/userindex":"{app}/admin/userindex.js",


		},
		preload: [
			"bootstrap"
		],

		//错误信息查看
		debug: 1,

		//文件映射
		map: [
			//可配置版本号
			//['.css', '.css?v=' + version],
			//['.js', '.js?v=' + version]
		],

		// 文件编码
		charset: function (url) {
			if (url.indexOf(".gbk.") > -1) {
				return "GBK";
			}
			return "UTF-8";
		}
	};
	var alias = config.alias;
	var v = typeof(rev) == "undefined" ? '' : '?v=' + rev;
	var suffix = (debug ? ".js" : ".min.js");
	for (var key in alias) {
		if (alias[key].indexOf(".min") == -1 && alias[key].indexOf("WdatePicker") == -1 && alias[key].indexOf(".js") != -1) {
			alias[key] = alias[key].replace(/\.js/, suffix) + v;
		}
	}
	seajs.config(config);
})();
